package com.zut.base.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author yyl
 * @since 2021-03-31
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 用户id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private String id;

    /**
     * 昵称
     */
    private String name;

    /**
     * 组织
     */
    private String organization;

    /**
     * 职位
     */
    private String job;

    /**
     * 简介
     */
    private String introduction;

    /**
     * 头像
     */
    @TableField(fill = FieldFill.INSERT)
    private String head;

    /**
     * 手机号
     */
    @Length(max = 11, min = 11, message = "手机号的长度必须是11位.")
    private String phone;

    /**
     * 密码
     */
    private String password;

    /**
     * 邮箱
     */
    @Email(message = "邮箱不符合规则!")
    private String email;

    /**
     * 是否禁用
     */
    @TableField("isDisabled")
    private String isdisabled;

    /**
     * 是否删除
     */
    @TableField("isDeleted")
    private String isdeleted;

    /**
     * 创建时间
     */
    @TableField(value="createTime",fill = FieldFill.INSERT)
    private Date createtime;

    /**
     * 更新时间
     */
    @TableField(value = "updateTime", fill = FieldFill.INSERT_UPDATE)
    private Date updatetime;


}
